/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.buzzwords.behaviors;

import com.buzzwords.exceptions.DuplicateEntryException;
import com.buzzwords.domain.Buzzword;
import java.util.List;

/**
 *
 * @author potlow
 */
public class BuzzwordIDBehavior extends DatabaseBehavior {

    @Override
    public boolean create(Object value) throws DuplicateEntryException {
        Buzzword buzzword;
        if(value instanceof com.buzzwords.domain.Buzzword) buzzword = (Buzzword)value;
        else throw new IllegalArgumentException("Search value must be a Buzzword");
        return persist(buzzword);
    }

    @Override
    public List<Object> read(Object value) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean update(Object value) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public boolean delete(Object value) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

}
